<!---
	Title:		EPAR1.1 
	Author:		Bruce Frick
	Purpose:	Step3 Conformation 2 page
--->

<cfset BASE = CreateObject("component", "cfc.base") / >
<cfset baseQueries = CreateObject("component", "#session.rootDir#.cfc.queries") />

<cfoutput>
<!---HTML header, css links, js links, and page title--->
#BASE.htmlHeader(
	"/jquery/ui-1.8.5/jquery-ui.min.js,/jquery/plugins/scrollTo/jquery.scrollTo-1.4.2-min.js,js/Step3-Orientation2.js", <!---JS links--->
    "/jquery/ui-1.8.5/themes/cupertino/jquery-ui.css", <!---CSS links--->
    "Step 3:  HR - Orientation 2", <!---Page Title--->
    "Status" <!---Active Nav Link--->
)#
<!---HTML header, css links, js links, and page title--->

    
<cfif Session.bolAuth EQ True and (Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR)>
    
    <!--- if the employee to hire isn't specified, redirect to Step 2 - Page 1 --->
<cfif not isdefined("URL.StepID")>
        <cflocation url="Step3-Orientation1.cfm" addtoken="no">
    </cfif>             
    
    <!---Query objects--->
    <cfset QUERIES = {} />
    <cfset QUERIES.GetEmpInfo = baseQueries.funcGetEmpInfo(URL.StepID) />
    <cfset QUERIES.GetDepts = baseQueries.funcGetDepts(QUERIES.GetEmpInfo.DeptID) />                   
    <cfset QUERIES.GetEthnicCodes =  baseQueries.funcGetEthnicCodes() />
    <cfset QUERIES.GetMaritalCodes = baseQueries.funcGetMaritalCodes() />
    <cfset QUERIES.GetGenderCodes = baseQueries.funcGetGenderCodes() />
    <cfset QUERIES.GetI9Codes = baseQueries.funcGetI9Codes() />
    <cfset QUERIES.GetPositionInfo = baseQueries.funcGetPositionCodes(QUERIES.GetEmpInfo.PositionID) />
    <!---Query objects--->
        
    <h1 class="title">Step 3:  HR - Orientation</h1>
    <div class="entry">
             
        Welcome, #Session.arrEmpInfo.FirstName# #Session.arrEmpInfo.LastName#.  
         On this page we'll capture additional information obtained by HR 
         from the employee during Orientation.
     
         <cfform name="frmStep3" method="post">
            <table cellpadding="0" cellspacing="0" width=100%>
                <tr>
                    <td>
                        Employee:
                    </td>
                    <td>
                    	<cfset Name = QUERIES.GetEmpInfo.First>
                    	<cfif QUERIES.GetEmpInfo.PreferredName NEQ "">
				<cfset Name = Name & ' (' & QUERIES.GetEmpInfo.PreferredName & ')'>
                        </cfif>
                        <cfif QUERIES.GetEmpInfo.Middle NEQ "">
                            <cfset Name = Name & ' ' & QUERIES.GetEmpInfo.Middle>
                        </cfif>
                        <cfset Name = Name & ' ' & QUERIES.GetEmpInfo.Last>
                        #Name#
                        <cfinput type="hidden" name="First" value="#QUERIES.GetEmpInfo.First#">
                        <cfinput type="hidden" name="PreferredName" value="#QUERIES.GetEmpInfo.PreferredName#">
                        <cfinput type="hidden" name="Last" value="#QUERIES.GetEmpInfo.Last#">
                    </td>
                </tr>
                <tr>
                    <td>
                        Position:
                    </td>
                    <td>
                        #QUERIES.GetPositionInfo.PositionCodeDescription# (  #QUERIES.GetPositionInfo.PositionCode#  )
                    </td>
                </tr>
                <tr>
                    <td>
                        Department:
                    </td>
                    <td>
                        #QUERIES.GetDepts.Org#
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <fieldset>
                            <legend></legend>
                            <table>
                                <tr>
                                    <td width = "10">&nbsp;
                                        
                                    </td>
                                    <td>
                                        SSN:
                                    </td>
                                    <td>
                                        <cfinput type="text" name="SSN" 
                                        error_message="Please provide a valid SSN or Tax ID in the format xxx-xx-xxxx" 
                                        tabindex="10" value="#QUERIES.GetEmpInfo.SSN#" >
                                    </td>
                                    <td width=25>&nbsp;
                                        
                                    </td>
                                    <td valign="top" nowrap="nowrap">
                                         Date of Hire:
                                    </td>
                                    <TD rowspan=6>	
                                        <cfif dateformat(QUERIES.GetEmpInfo.ActStartDate,'mm/dd/yyyy') NEQ "">
                                            <cfinput type="hidden" name="DateOfHire" error_message="Please provide a valid Date of Hire."
                                            	value="#dateformat(QUERIES.GetEmpInfo.ActStartDate,'mm/dd/yyyy')#"/>
                                            <div id="DateOfHire_datepicker"></div>
                                            <cfinput type="hidden" name="PreFillDate" error_message="Please provide a valid Date of Hire."
                                            	value="#dateformat(QUERIES.GetEmpInfo.ActStartDate,'mm/dd/yyyy')#">
                                        <cfelse>                                                
                                            <cfinput type="hidden" name="DateOfHire" error_message="Please provide a valid Date of Hire."
                                            	value="#dateformat(QUERIES.GetEmpInfo.EstStartDate,'mm/dd/yyyy')#"/>
                                            <div id="DateOfHire_datepicker"></div>
                                            <cfinput type="hidden" name="PreFillDate" error_message="Please provide a valid Date of Hire."
                                            	value="#dateformat(QUERIES.GetEmpInfo.EstStartDate,'mm/dd/yyyy')#">
                                        </cfif>
                                    </TD>
                                </tr>
                                <tr>
                                    <td width = "10">&nbsp;
                                        
                                    </td>
                                    <td>
                                        DOB:
                                    </td>
                                    <td>
                                        <cfinput type="text" name="DOB" size="20" style="margin-right:2px;"
                                        error_message="Please provide a valid Date Of Birth in the format MM/DD/YYYY" 
                                        tabindex="20" value="#QUERIES.GetEmpInfo.DOB#" >
                                    </td>
                                </tr>
                                <tr>
                                    <td width = "10">&nbsp;  </td>
                                    <td>
                                        Gender:
                                    </td>
                                    <td>
                                        <cfselect name="GenderID" query="QUERIES.GetGenderCodes" 
                                        value="PersonCodeIDNo" display="PersonCode"
                                        tabindex="30" selected="#QUERIES.GetEmpInfo.GenderID#" />
                                    </td>
                                </tr>
                                <tr>
                                    <td width = "10">&nbsp;  </td>
                                    <td nowrap="nowrap">
                                        Marital Status:
                                    </td>
                                    <td>
                                        <cfselect name="MaritalStatusID" query="QUERIES.GetMaritalCodes" 
                                        value="PersonCodeIDNo" display="PersonCode" 
                                        tabindex="40" selected="#QUERIES.GetEmpInfo.MaritalStatusID#"/>                        
                                    </td>
                                </tr>
                                <TR>
                                    <td width = "10">&nbsp;
                                        
                                    </td>
                                    <TD nowrap="nowrap">
                                        Ethnic Origin:
                                    </TD>
                                    <TD>
                                        <cfselect name="EthnicID" query="QUERIES.GetEthnicCodes" 
                                        tabindex="50" value="EthnicCodeIDNo" display="EthnicCode" 
                                        selected="#QUERIES.GetEmpInfo.EthnicID#" />
                                    </TD>
                                </TR> 
                                <tr>
                                    <td width = "10">&nbsp;
                                        
                                    </td>
                                    <td valign="top">
                                         I- 9 On File:
                                    </td>
                                    <TD>
                                        <cfselect name="I9" query="QUERIES.GetI9Codes" 
                                        tabindex="60" value="PersonCodeIDNo" 
                                        display="PersonCode" selected="#QUERIES.GetEmpInfo.I9#"/>
                                    </TD>
                                </TR>  
                                <tr>
                                    <td width = "10">&nbsp;
                                        
                                    </td>
                                    <td valign="top">
                                         Comments:
                                    </td>
                                    <td colspan ='5'>
                                        <cftextarea name="Notes" tabindex="80" style="width:98%" />
                                    </td>
                                </TR>                                                                       
                            </table>     
                        </fieldset>
                    </td>
                </tr>
                <tr>
                    <td>&nbsp;
                        
                    </td>
               </tr>
                <tr>
                    <td colspan="5" align="right" valign="middle" style="padding-top:5px;">
                        <cfinput type="hidden" name="EmpID" value="#QUERIES.GetEmpInfo.ID#">
                        <cfinput type="hidden" name="StepID" value="#URL.StepID#">
                        <cfinput type="button" name="Submit" value="Next >>" tabindex="150" style="float:right">
                        <cfinput type="button" name="NoShow" value="No Show" tabindex="140">
                    </td>
                </tr>
            </table>
        </cfform>
    
    </div>

<cfelse>
    <cfinclude template="denied.cfm">
</cfif>
    

<!---HTML footer, closes html and body tags.  Any footer info goes here--->
#BASE.htmlFooter()#
<!---HTML footer, closes html and body tags.  Any footer info goes here--->
</cfoutput>